[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
PICTURE Anomalies with the PICTURE clause.
Clipper Version 1.03 dtd 09/15/90.
Problem Statement
1) PICTURE "Y" May return lowercase, if character type variable.
Using @ <row>, <col> GET <cVar> PICTURE "Y" OR
Using @ <row>, <col> SAY <cString> GET <cVar> PICTURE "Y"
will not force UPPER(cVar); i.e., cVar returned will be the same
case as entered by the user.
2) PICTURE "@R <template> may not produce the desired results, per
the following example:
Using @ <row>, <col> SAY "abcdefgh" PICTURE "@R X_X_X_X_X_X_X_X"
produces a_b_c_defgh.
3) The PICTURE clause may truncate a variable but will not increase
it's length. Examples:
cVar := ""
@ row, col get cVar PICTURE "!!!!!" // Does not work.
cVar := SPACE(10)
@ row, col get cVar PICTURE "!!!!!" // Will truncate cVar.
Cause
1) Not implemented in STD.CH
2) Unknown.
3) Unknown.
Work Around(s)
1) Place the following line at the beginning of your program or
at the end of MYNAME.CH
#translate PICTURE "Y" => PICTURE "@! Y"
2) Format the string through other means. It appears that this template
will work if four or less items of the input string are to be
formatted at a time; i.e., "8185551212" to "@R (999)999-9999" works
satisfactorily.
3) Exercise caution in programming.
See Also:
STD.CH
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson